<template>
  <div style="width:100vw;" class="result-box">
    <div class="result-header">
      <!-- 返回按钮 -->
      <!-- <mt-header fixed title="申请结果">
        <router-link to="/" slot="left">
          <mt-button class="back-butt" icon="back"></mt-button>
        </router-link>
      </mt-header>-->
    </div>
    <div class="result-body">
      <div class="bscroll" ref="bscroll">
        <div class="bscroll-container">
          <div class="default-page-box" v-show="applyResult.length == 0">
            <div class="default-page">
              <div class="default-text">哎呀，空空如也!</div>
            </div>
          </div>
          <div v-for="(item,index) in applyResult" :key="index" class="result-item-box flex-row">
            <div class="result-item flex-row">
              <div class="body-picture">
                <img src="@/assets/homePicture/userpicture.png" alt />
              </div>
              <div class="body-content flex-column">
                <div class="body-tip">{{item.username}}提交的申请晋级结果</div>
                <div class="body-detail">
                  <span>目前岗位：</span>
                  <span>{{item.upperRankName}}</span>
                </div>
                <div class="body-detail">
                  <span>晋级岗位：</span>
                  <span>{{item.nextRankName}}</span>
                </div>
                <div class="body-detail">
                  <span>晋级结果：</span>
                  <span
                    style="color:#FF0000;"
                    class="result-color"
                  >{{item.status==1 ? '待审批': item.status==2 ? '晋级成功' : item.status==3 ? '晋级失败' : ''}}</span>
                </div>
              </div>
            </div>
            <div class="body-time">{{item.creationTime ? item.creationTime.split(' ')[0] : ''}}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import BScroll from "better-scroll";
import { setText } from "../../untils/ddnavigate";
// const easydate = require("../../untils/easydate");
export default {
  name: "applicationResult",
  data() {
    return {
      applyResult: []
    };
  },
  mounted() {
    // better-scroll初始化
    this.$nextTick(() => {
      let bscrollDom = this.$refs.bscroll;
      this.aBScroll = new BScroll(bscrollDom, {
        click: true
      });
    });
    setText("申请结果");
    this.$get("approval").then(res => {
      if (res.success) {
        this.applyResult = res.data;
      }
    });
  }
};
</script>
<style lang="less" scoped>
@import url("~@/pagecss/applicationResult.less");
.default-page {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("~@/assets/studyCenter/null.png") 50% 30% no-repeat;
  background-size: 352/75rem 215/75rem;
}
.default-text {
  left: 0;
  right: 0;
  position: absolute;
  top: 45%;
  text-align: center;
  font-size: 30/75rem;
  font-weight: 400;
  color: rgba(110, 176, 246, 0.7);
}
</style>